<?php
/**
 * Text element
 *
 */
class ArrowFormFile extends ArrowFormField{
	
	
	public function configure(){
		parent::configure();	
		$this->addProperties(array(
			"accepted" => false,
			"rexp" => false
		));
	}	
	
	
	public function validate( $proposedValue ){
		return true;
	}
	
	public function generateOutput(){
		$attribuites = array();
		$attribuites["name"] = $this->getName();
		
		
		$str ='<input type="file" '.$this->genTagsFromArray($attribuites).' '.$this->addExternal().'/>';
		$value = $this->getValue(); 
		if( !empty($value) ){
			$str.= '<input type="checkbox" name="data[resourceR][]" value="'.$attribuites["name"].'" /> Usuń <br />';
			$str.= '<a href="'.$value.'" target="_blank" />zobacz</a>';
		}
		return $str;
	}


}
?>